Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service label in traefik_service_server_up metric is not human-readable #10734

Open
2 tasks done
ckoenig opened this issue May 17, 2024 · 4 comments
Open
2 tasks done
Labels
area/middleware/metrics contributor/wanted Participation from an external contributor is highly requested kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed.

Comments

@ckoenig
Copy link

ckoenig commented May 17, 2024

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?

We are currently testing traefik v3 and as part of that we were investigating the metrics provided for Prometheus. We stumbled upon the following

# HELP traefik_service_server_up service server is up, described by gauge value of 0 or 1.
# TYPE traefik_service_server_up gauge
traefik_service_server_up{service="54033f984f82fa50",url="http://10.132.0.27:31012"} 1
traefik_service_server_up{service="5b667b985355cb4e",url="http://10.132.0.27:31331"} 1
traefik_service_server_up{service="6163188672cf989b",url="http://10.132.0.42:31447"} 1
traefik_service_server_up{service="616d0d8672d7da6f",url="http://10.132.0.42:31432"} 1
traefik_service_server_up{service="7a90018680d71149",url="http://10.132.0.42:31311"} 1
traefik_service_server_up{service="8caee5868b54566d",url="http://10.132.0.42:31157"} 1
traefik_service_server_up{service="8cbfdc868b62ba55",url="http://10.132.0.42:31100"} 1

We would have expected that the service label contains some human-readable value identifying the service affected. We also could not find any other metrics showing those IDs. So, there is also no way to join this with some other metric to retrieve a human-readable version.

The documentation mentions several metrics with a service label, e.g. traefik_service_requests_total. The service label for that metric is human-readable and not just some identifier.

What did you see instead?

Instead of seeing something like service="SERVICE@PROVIDER" we see service="SOMEID". This only seems to be the case for the traefik_service_server_up metric though.

What version of Traefik are you using?

$ kubectl describe deployment traefik  | grep Image
    Image:       docker.io/traefik:v3.0.0

What is your environment & configuration?

...
metrics:
  prometheus:
    service:
      enabled: true
    serviceMonitor:
      interval: 30s
...

Probably not relevant though.

If applicable, please paste the log output in DEBUG level

No response

@emilevauge emilevauge added kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. contributor/wanted Participation from an external contributor is highly requested area/middleware/metrics and removed status/0-needs-triage labels May 23, 2024
@emilevauge
Copy link
Member

Hey @ckoenig, thanks for submitting this issue. It might be a bug, we should see the serive name instead. If anyone from the community can have a look, that would be great :)

@KrishnaSindhur
Copy link

can I look into it!!

@stefanbankow
Copy link

Can confirm i'm experiencing similar behavior when running traefik through a docker-compose file. Reverting back to traefik:v2.6 fixes this issue and changes the traefik_service_server_up service label back to service-name@provider

@DrFaust92
Copy link

I can try and take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/middleware/metrics contributor/wanted Participation from an external contributor is highly requested kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed.
Projects
None yet
Development

No branches or pull requests

6 participants